#pragma once

#include "NtAutoPtr.h"

class NtD3DTexture9: public NtCountedObject
{
public:
	NtD3DTexture9(void);
	~NtD3DTexture9(void);
	void Release();

	operator LPDIRECT3DTEXTURE9() 
	{ 
		return m_pTexture;
	}

	LPDIRECT3DTEXTURE9 operator()()
	{ 
		return m_pTexture;
	}

	/// Note: very danger! memory leak.
	void operator = (LPDIRECT3DTEXTURE9 p) 
	{
		m_pTexture = p; 
	}

	void LoadTexture( const char* szTexture );

protected:
	LPDIRECT3DTEXTURE9 m_pTexture;
};

NtAutoPtr(NtD3DTexture9);
